#ifndef _DevicesPower_H_
#define _DevicesPower_H_




#define POWER_12V           0x01
#define POWER_3_3V          0x02
#define POWER_CHARTE_20V    0x04
#define POWER_CHARTE_3_3V   0x08
#define POWER_AIR_DRYING    0x10
#define POWER_DUST_HOOD     0x20
#define POWER_PTC           0x40
#define POWER_ALL           0xFFFF




#define POWER_12V_GPIO_Port         GPIOF
#define POWER_12V_Pin               GPIO_PIN_6

#define POWER_3_3V_GPIO_Port        GPIOF
#define POWER_3_3V_Pin              GPIO_PIN_7

#define POWER_CHARTE_20V_GPIO_Port  GPIOB
#define POWER_CHARTE_20V_Pin        GPIO_PIN_13

#define POWER_CHARTE_3_3V_GPIO_Port GPIOB
#define POWER_CHARTE_3_3V_Pin       GPIO_PIN_12

/* 风干 */
#define POWER_AIR_DRYING_GPIO_Port  GPIOA
#define POWER_AIR_DRYING_Pin        GPIO_PIN_12

/* 集尘 */
#define POWER_DUST_HOOD_GPIO_Port   GPIOB
#define POWER_DUST_HOOD_Pin         GPIO_PIN_15

/* PTC加热 */
#define POWER_PTC_GPIO_Port         GPIOB
#define POWER_PTC_Pin               GPIO_PIN_14



#define POWER_12V_ENABLE() GPIO_SetBits(POWER_12V_GPIO_Port, POWER_12V_Pin)
#define POWER_12V_DISABLE() GPIO_ResetBits(POWER_12V_GPIO_Port, POWER_12V_Pin)

#define POWER_3_3V_ENABLE() GPIO_ResetBits(POWER_3_3V_GPIO_Port, POWER_3_3V_Pin)
#define POWER_3_3V_DISABLE() GPIO_SetBits(POWER_3_3V_GPIO_Port, POWER_3_3V_Pin)

#define POWER_CHARTE_20V_ENABLE() GPIO_SetBits(POWER_CHARTE_20V_GPIO_Port, POWER_CHARTE_20V_Pin)
#define POWER_CHARTE_20V_DISABLE() GPIO_ResetBits(POWER_CHARTE_20V_GPIO_Port, POWER_CHARTE_20V_Pin)

#define POWER_CHARTE_3_3V_ENABLE() GPIO_SetBits(POWER_CHARTE_3_3V_GPIO_Port, POWER_CHARTE_3_3V_Pin)
#define POWER_CHARTE_3_3V_DISABLE() GPIO_ResetBits(POWER_CHARTE_3_3V_GPIO_Port, POWER_CHARTE_3_3V_Pin)

#define POWER_AIR_DRYING_ENABLE() GPIO_SetBits(POWER_AIR_DRYING_GPIO_Port, POWER_AIR_DRYING_Pin)
#define POWER_AIR_DRYING_DISABLE() GPIO_ResetBits(POWER_AIR_DRYING_GPIO_Port, POWER_AIR_DRYING_Pin)

#define POWER_DUST_HOOD_ENABLE() GPIO_SetBits(POWER_DUST_HOOD_GPIO_Port, POWER_DUST_HOOD_Pin)
#define POWER_DUST_HOOD_DISABLE() GPIO_ResetBits(POWER_DUST_HOOD_GPIO_Port, POWER_DUST_HOOD_Pin)

#define POWER_PTC_ENABLE() GPIO_SetBits(POWER_PTC_GPIO_Port, POWER_PTC_Pin)
#define POWER_PTC_DISABLE() GPIO_ResetBits(POWER_PTC_GPIO_Port, POWER_PTC_Pin)



void vPowerInit(void);
void vPowerOpen(uint16_t usNumber);
void vPowerClose(uint16_t usNumber);

#endif
